package member.action;

import java.sql.Timestamp;
import com.opensymphony.xwork2.ActionSupport;
import member.dao.MemberDao;
import member.dto.MemberDto;

public class InputAction extends ActionSupport {
	

	private String id;
	private String password;
	private String nickname;
	private String birth;
	private String gender;
	private String email;
	private Timestamp reg_date;
	private String myInfo;
	private MemberDto paramClass;
	
public String form() throws Exception {
		
		return SUCCESS;
	}
	
	public String execute() throws Exception {
	
	paramClass = new MemberDto();
	
	paramClass.setId(getId());
	paramClass.setPassword(getPassword());
	paramClass.setNickname(getNickname());
	paramClass.setBirth(getBirth());
	paramClass.setGender(getGender());
	paramClass.setEmail(getEmail());
	paramClass.setReg_date(new Timestamp(System.currentTimeMillis()));
	paramClass.setMyInfo(getMyInfo());
	
	MemberDao.insertUser(paramClass);
	
		
		return "success";
	}


	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getBirth() {
		return birth;
	}

	public void setBirth(String birth) {
		this.birth = birth;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Timestamp getReg_date() {
		return reg_date;
	}

	public void setReg_date(Timestamp reg_date) {
		this.reg_date = reg_date;
	}

	
	public String getMyInfo() {
		return myInfo;
	}

	public void setMyInfo(String myInfo) {
		this.myInfo = myInfo;
	}



}
